package com.weipu.common.facade.model.config;

import java.io.Serializable;

/**
 * 程序配置实体，映射服务端控制配置
 * @author Administrator
 *
 */
public class Config implements Serializable
{
    /**
     */
    private static final long serialVersionUID = 7174058974063439329L;
    
    /**
     * 服务端版本配置： 1：开发环境，2：现网环境
     */
    private int serverVersion = 2;
    
    public int getServerVersion()
    {
        return serverVersion;
    }
    
    public void setServerVersion(int serverVersion)
    {
        this.serverVersion = serverVersion;
    }
    
    private AppInfoConfig appInfoConfig;//程序相关配置信息
    
    private StartupConfig startupConfig;//启动相关程序配置
    
    private CacheConfigModel cacheConfig;//缓存配置对象
    
    //    private ServerConfig serverConfig;//服务端信息配置
    
    private LogConfig logConfig;//日志监控配置
    
    public LogConfig getLogConfig()
    {
        return logConfig;
    }
    
    public void setLogConfig(LogConfig logConfig)
    {
        this.logConfig = logConfig;
    }
    
    //    public ServerConfig getServerConfig()
    //    {
    //        return serverConfig;
    //    }
    //    
    //    public void setServerConfig(ServerConfig serverConfig)
    //    {
    //        this.serverConfig = serverConfig;
    //    }
    
    public AppInfoConfig getAppInfoConfig()
    {
        return appInfoConfig;
    }
    
    public void setAppInfoConfig(AppInfoConfig appInfoConfig)
    {
        this.appInfoConfig = appInfoConfig;
    }
    
    public StartupConfig getStartupConfig()
    {
        return startupConfig;
    }
    
    public void setStartupConfig(StartupConfig startupConfig)
    {
        this.startupConfig = startupConfig;
    }
    
    public CacheConfigModel getCacheConfig()
    {
        return cacheConfig;
    }
    
    public void setCacheConfig(CacheConfigModel cacheConfig)
    {
        this.cacheConfig = cacheConfig;
    }
    
    @Override
    public int hashCode()
    {
        return toString().hashCode();
    }
    
    @Override
    public String toString()
    {
        StringBuffer sb = new StringBuffer();
        
        sb.append("AppInfoConfig: ").append(appInfoConfig).append('\n');
        sb.append("StartupConfig: ").append(startupConfig).append('\n');
        //        sb.append("ServerConfig: ").append(serverConfig).append('\n');
        sb.append("LogConfig: ").append(logConfig).append('\n');
        sb.append("CacheConfigModel: ").append(cacheConfig);
        
        return sb.toString();
    }
}
